<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>茶叶销售管理系统</title>
<link rel="stylesheet" href="../css/main.css">
<link rel="stylesheet" href="../css/footer.css">
<link rel="stylesheet"
	href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
<script
	src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script
	src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script language="javascript" type="text/javascript">
	function check() {
		var e = $("#email").val();
		var p = $("#phone").val();//#表示ID .表示类
		var reg = /^((0\d{2,3}-\d{7,8})|(1[3584]\d{9}))$/;
		if (!/(\S)+[@]{1}(\S)+[.]{1}(\w)+/.test(e)) {
			alert("请输入格式正确的 e-mail 地址！");
			return false;
		} else if (!reg.test(p)) {
			alert("请输入正确的电话格式!");
			return false;
		} else {
			alert()
			return true;
		}
	}
</script>
</head>
<body>
	<jsp:include page="navbar.jsp" />

	<div class="py-4">
		<div class="container">
			<div class="row">
				<div class="col-md-12">
					<h1 class="display-1 text-center">个人信息</h1>
				</div>
			</div>
		</div>
	</div>

	<div class="py-5">
		<div class="container">
			<div class="row">
				<div class="col-md-3"></div>
				<div class="col-md-6">
					<form name="form" action="baseMessageModify.action" method="post"
						onsubmit="return check();">
						<div class="form-group">
							<label id="userId">id</label> <input type="text"
								class="form-control form-control-lg" value="${user.id }"
								name="id" readonly="readonly">
						</div>
						<div class="form-group">
							<label id="userAccount">账号</label> <input type="text"
								class="form-control form-control-lg" value="${user.account }"
								name="account" readonly="readonly">
						</div>
						<div class="form-group">
							<label id="userEmail">邮箱</label> <input type="text"
								class="form-control form-control-lg" value="${user.email }"
								name="email" id="email">
						</div>
						<div class="form-group">
							<label id="userPhone">电话</label> <input type="text"
								class="form-control form-control-lg" value="${user.phone }"
								name="phone" id="phone">
						</div>
						<div class="form-group">
							<label id="userinfo">注册时间</label> <input type="text"
								class="form-control form-control-lg" value="${user.regDate }"
								name="regDate" readonly="readonly">
						</div>
						<div class="form-group">
							<button type="submit" class="btn btn-success" onclick="check()">保存修改</button>
							<input type="button" class="btn btn-primary" name="cancel"
								value="返回" onclick="javascript:history.go(-1)" />
						</div>
						<font color="red">${requestScope.errorMessage}</font>
					</form>
				</div>
				<div class="col-md-3"></div>
			</div>
		</div>
	</div>


</body>
</html>